#include "MyString.h"

void				MyString::trim(std::string & str)
{
  str.erase(0, str.find_first_not_of(" \t"));
  str.erase(str.find_last_not_of(" \t") + 1);
}

bool				MyString::isNumber(std::string & str)
{
  int				i = 0;

  while (str[i] != '\0' && (str[i] == '+' || str[i] == '-'))
    ++i;
  while (str[i] != '\0' && str[i] >= '0' && str[i] <= '9')
    ++i;
  if (str[i] == '\0')
    return (true);
  return (false);
}
